
function setTelVorwahl(feldname){
	landid = document.getElementById(feldname).value;
	//var address = document.getElementById(feldname).value;
	//alert("Teltest " + testwert);
	
	
	var url = location.href;  // entire url including querystring - also: window.location.href;
	var baseURL = url.substring(0, url.indexOf('/', 40));
	
	result = $.ajax({
		type: 'POST',
		async: false,
		url: baseURL + '/library/Helper/Registrierung.php',
		//url : "/sailorbase-a/sailorbase-a/public/Turnplaner/getturnpoints",
		data: ({
			funktion: "telvorwahl",
			id: landid
		})
	}).responseText;
	var data = result
	
	//var data = '{ "name": "Violet", "occupation": "character" }'.evalJSON();
	//alert(data);
	document.getElementById('landervorwahl').value = data;
	//return data;
	
}


function showagb(){

	var url = location.href;  // entire url including querystring - also: window.location.href;
	var baseURL = url.substring(0, url.indexOf('/', 50));
	
	result = $.ajax({
		type: 'POST',
		async: false,
		url: baseURL + '/Html/AGB.html'
	}).responseText;

	var ScreenWidth=window.screen.width;
	var ScreenHeight=window.screen.height;
	var movefromedge=0;
	placementx=(ScreenWidth/8);
	placementy=(ScreenHeight/8);
	weite = ScreenWidth/1.5;
	hohe =ScreenHeight/1.5;
	WinPop=window.open("About:Blank","","width="+weite+",height="+hohe+",toolbar=0,location=0,directories=0,status=0,scrollbars=yes,menubar=0,resizable=0,left="+placementx+",top="+placementy+",scre enX="+placementx+",screenY="+placementy+",");
	WinPop.document.write('<html>\n<head>\n</head>\n<body>'+result+'</body></html>');

/*

	var ScreenWidth=window.screen.width;
	var ScreenHeight=window.screen.height;
	var movefromedge=0;
	placementx=(ScreenWidth/4);
	placementy=(ScreenHeight/4);
	weite = ScreenWidth/2;
	hohe =ScreenHeight/2;
	WinPop=window.open("About:Blank","","width="+weite+",height="+hohe+",toolbar=0,location=0,directories=0,status=0,scrollbars=yes,menubar=0,resizable=0,left="+placementx+",top="+placementy+",scre enX="+placementx+",screenY="+placementy+",");
	//var SayWhat = "<h1>AGB</h1> <a href='#' onclick=\"document.getElementById('mail').value = 'TTEST';\";>Coding Forums</a><br>";
	var SayWhat = "TEST";
	
	var url = location.href;  // entire url including querystring - also: window.location.href;
	var baseURL = url.substring(0, url.indexOf('/', 50));
	//alert(baseURL + '/Html/AGB.html');
	
	result = $.ajax({
		type: 'POST',
		async: false,
		url: baseURL + '/Html/AGB.html'
	}).responseText;
	
	//nutze Prototype um den String in ein array zu zerlegen
	//alert(result);
	
	//WinPop.document.write("test" + result);
	WinPop.document.write('<html>\n<head>\n</head>\n<body>Manuel</body></html>');
	//WinPop.document.write('<html>\n<head>\n</head>\n<body>'+result+'</body></html>');
*/
}

